|
2020-2021 Sunseeker Telemetry and Lighting System
|
#include "driverlib.h"Go to the source code of this file.
Macros | |
| #define | INFOC_START (0x1880) |
| #define | INFOD_START (0x1800) |
| #define | NUMBER_OF_BYTES 128 |
| #define | DELAY_TIME 1000000 |
Functions | |
| void | write_SegC (void) |
| void | copy_C2D (void) |
| void | main (void) |
Variables | |
| uint8_t | calibration_data [NUMBER_OF_BYTES] |
| #define DELAY_TIME 1000000 |
Definition at line 89 of file flashctl_ex2_eraseCopyWrite.c.
| #define INFOC_START (0x1880) |
This program first erases flash seg C, then it increments all values in seg C, then it erases seg D, then copies seg C to seg D. LED toggles upon completion. Starting addresses of segments defined in this code: Seg C-0x1880, Seg D-0x1800. ACLK = REFO = 32kHz, MCLK = SMCLK = default DCO 1048576Hz
/|| | | | P1.0|-LED –|RST | | |
This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:
This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.
Definition at line 62 of file flashctl_ex2_eraseCopyWrite.c.
| #define INFOD_START (0x1800) |
Definition at line 68 of file flashctl_ex2_eraseCopyWrite.c.
| #define NUMBER_OF_BYTES 128 |
Definition at line 75 of file flashctl_ex2_eraseCopyWrite.c.
| void copy_C2D | ( | void | ) |
Definition at line 165 of file flashctl_ex2_eraseCopyWrite.c.
References INFOC_START, INFOD_START, NUMBER_OF_BYTES, status, and STATUS_FAIL.
Referenced by main().
| void main | ( | void | ) |
Definition at line 99 of file flashctl_ex2_eraseCopyWrite.c.
References __delay_cycles(), calibration_data, copy_C2D(), DELAY_TIME, i, NUMBER_OF_BYTES, and write_SegC().
| void write_SegC | ( | void | ) |
Definition at line 142 of file flashctl_ex2_eraseCopyWrite.c.
References calibration_data, INFOC_START, NUMBER_OF_BYTES, status, and STATUS_FAIL.
Referenced by main().
| uint8_t calibration_data[NUMBER_OF_BYTES] |
Definition at line 82 of file flashctl_ex2_eraseCopyWrite.c.
Referenced by main(), and write_SegC().